class HiNetError {
  final int? code;
  final String message;
  final dynamic data;

  HiNetError(this.code, this.message, {this.data});
}

/// 访问受限
class NeedAuthor extends HiNetError {
  NeedAuthor(String message, {int code = 403, dynamic data})
      : super(code, message, data: data);
}

class NeedLogin extends HiNetError {
  NeedLogin({int code = 401, String message = "需要登录"}) : super(code, message);
}
